package com.anlu.pattern.action.strategy;

import org.springframework.stereotype.Service;

/**
 * 满减的实现类
 */
@Service(value = "FullDiscount")
public class FullDiscount implements Discount{
    @Override
    public int calculate(int money) {
        System.out.println("进入到FullDiscount");
        if (money > 200){
            System.out.println("优惠减免20元");
            return money - 20;
        }
        return money;
    }
}
